//
//  CHUploadDataCell.m
//  CarFile
//
//  Created by 陈浩 on 2017/7/17.
//  Copyright © 2017年 陈浩. All rights reserved.
//

#import "CHUploadDataCell.h"
@interface CHUploadDataCell()
{
    UILabel *titleLabel;
    UILabel *scoreLabel;
    
    
}
@end
@implementation CHUploadDataCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

+(instancetype)cellForTableView:(UITableView *)tableView{
    static NSString *ID = @"CHUploadDataCell";
    CHUploadDataCell *cell = [tableView dequeueReusableCellWithIdentifier:ID];
    if (!cell) {
        cell =[[CHUploadDataCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:ID];
    }
    return cell;
    
}

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
//        self.backgroundColor = KRGB(239, 239, 249);
        [self buildUI];
    }
    return self;
}

-(void)buildUI{
    
    titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, UIScreenW/2, self.h)];
    titleLabel.font = [UIFont systemFontOfSize:14];
    titleLabel.textAlignment = NSTextAlignmentCenter;
    titleLabel.textColor = [UIColor colorWithHexString:@"999999" alpha:1.0f];
    [self.contentView addSubview:titleLabel];
    
    scoreLabel = [[UILabel alloc] initWithFrame:CGRectMake(UIScreenW /2, 0, UIScreenW /2, self.h)];
    scoreLabel.font = [UIFont systemFontOfSize:14];
    scoreLabel.textAlignment = NSTextAlignmentCenter;
    scoreLabel.textColor =  [UIColor colorWithHexString:@"148EC7" alpha:1.0f];
    [self.contentView addSubview:scoreLabel];
    
    
}

-(void)setModel:(UploadDataModel *)model{
    _model = model;
    titleLabel.text = model.areacn;
    scoreLabel.text = model.allscore;
    
}

@end
